#!/usr/bin/python
__author__ = 'changwoncheo'
from socket import socket
import threading

class mythread (threading.Thread):
    def __init__(self,socket):
        threading.Thread.__init__(self)
        self.socket = socket
    def run(self):
        while(1):
            print self.socket.recv(1024)

s=socket()
s.connect(('127.0.0.1',9876))
s.send('@enter -1')
mythread(s).start()
while(1):
    input = raw_input()
    s.send(input)
